*use CCES14_UMA_OUTPUT_Aug2015_vm.dta*

svyset [pw=weight]

**Dependent Variables
*Name Change
gen namechangepre = UMA338
recode namechangepre (1=0) (2=.25) (3=.5) (4=.75) (5=1) (6=.)
tab namechangepre
tab UMA338

*Name Offensive
gen nameoffensivepre = UMA339
recode nameoffensivepre (1=0) (2=.25) (3=.5) (4=.75) (5=1) (6=.)
tab nameoffensivepre
tab UMA339

*Team Name Index
generate skindvpre = (namechangepre + nameoffensivepre)/2
tab skindvpre


*Independent Variables
**RACE**
gen black = race
recode black (1=0) (2=1) (3/8=0)
tab black
tab race

gen latino = race
recode latino (1/2=0) (3=1) (4/8=0)
tab latino
tab race

gen asian = race
recode asian (1/3=0) (4=1) (5/8=0)
tab asian
tab race

gen nativeamerican = race
recode nativeamerican (1/4=0) (5=1) (6/8=0)
tab nativeamerican

gen other = race
recode other (1/5=0) (6/8=1)
tab other
tab race

gen white = race
recode white (1=1) (2/8=0)
tab white
tab race

**age
gen age=(2014-birthyr)/94
tab age

**education 0-1
recode educ (1=0) (2=.20) (3=.40) (4=.60) (5=.80) (6=1), gen(education)
tab education 
tab educ

**original coding of partyid (0 to 1 with 1 = Republican)
recode pid7 (8=4), gen(partyid) 
recode partyid (1=0) (2=.16) (3=.32) (4=.48) (5=.64) (6=.80) (7=1)
tab partyid
tab pid7

**correct coding of partyid
*run model with both old and new measure below
recode pid7 (8=4), gen(correctpartyid7) 
replace correctpartyid7 = (correctpartyid7-1)/6
tab pid7 
tab correctpartyid7

**ideology (0-1 with Conservative at 1)
recode ideo5 (6=.), gen(ideology)
recode ideology (1=0) (2=.25) (3=.5) (4=.75) (5=1)
tab ideology
tab ideo5

**income
gen income2 = faminc
recode income2 (97/99=.)
recode income2 31=12
gen income=income2
recode income 1=.0625 2=.125 3=.1875 4=.25 5=.3125 6=.375 7=.4375 8=.50 9=.5625 10=.625 11=.6875 12=.75 13=.8125 14=.875 15=.9375 16=1
tab income
tab faminc

gen female = gender
recode female (1=0) (2=1)
tab female 
tab gender

**Original Measure of Washington Fan*
gen case_id = _n
gen redskinsfan = .
replace redskinsfan =1 if (case_id==35)
replace redskinsfan =1 if (case_id==107)
replace redskinsfan =1 if (case_id==122)
replace redskinsfan =1 if (case_id==134)
replace redskinsfan =1 if (case_id==180)
replace redskinsfan =1 if (case_id==223)
replace redskinsfan =1 if (case_id==224)
replace redskinsfan =1 if (case_id==270)
replace redskinsfan =1 if (case_id==271)
replace redskinsfan =1 if (case_id==635)
replace redskinsfan =1 if (case_id==695)
replace redskinsfan =1 if (case_id==733)
replace redskinsfan =1 if (case_id==761)
replace redskinsfan =1 if (case_id==780)
replace redskinsfan =1 if (case_id==850)
replace redskinsfan =1 if (case_id==872)
replace redskinsfan =1 if (case_id==930)
replace redskinsfan =1 if (case_id==1140)
replace redskinsfan =1 if (case_id==1236)
replace redskinsfan =1 if (case_id==1244)
replace redskinsfan =1 if (case_id==1310)
replace redskinsfan =1 if (case_id==1312)
replace redskinsfan =1 if (case_id==1443)
replace redskinsfan =1 if (case_id==1500)
replace redskinsfan =1 if (case_id==1579)
replace redskinsfan =1 if (case_id==1985)
replace redskinsfan =1 if (case_id==2153)
replace redskinsfan =1 if (case_id==2195)
replace redskinsfan =1 if (case_id==2214)
replace redskinsfan =0 if (redskinsfan ~=1)
tab redskinsfan

*Corrected Measure of Fandom*
*On post-publication Review we discovered an additional Washington fan
gen washfan = .
replace washfan =1 if (V101==227476991)
replace washfan =1 if (V101==227299448)
replace washfan =1 if (V101==227278571)
replace washfan =1 if (V101==227245022)
replace washfan =1 if (V101==228959379)
replace washfan =1 if (V101==229877709)
replace washfan =1 if (V101==228763149)
replace washfan =1 if (V101==228943387)
replace washfan =1 if (V101==229645964)
replace washfan =1 if (V101==227138631)
replace washfan =1 if (V101==228211765)
replace washfan =1 if (V101==228072357)
replace washfan =1 if (V101==228457352)
replace washfan =1 if (V101==227953272)
replace washfan =1 if (V101==229084565)
replace washfan =1 if (V101==227310726)
replace washfan =1 if (V101==227159655)
replace washfan =1 if (V101==227310949)
replace washfan =1 if (V101==227580815)
replace washfan =1 if (V101==227718623)
replace washfan =1 if (V101==229035864)
replace washfan =1 if (V101==227299715)
replace washfan =1 if (V101==230118796)
replace washfan =1 if (V101==228871420)
replace washfan =1 if (V101==227541050)
replace washfan =1 if (V101==230089349)
replace washfan =1 if (V101==228874897)
replace washfan =1 if (V101==228691190)
replace washfan =1 if (V101==227611028)
replace washfan =1 if (V101==226598856)
replace washfan =0 if (washfan ~=1)
tab washfan

**NFL Interest Variable & Sophistication Index
gen sportsint = UMA340
recode sportsint (1=1) (2=.75) (3=.5) (4=.25) (5=0) 
tab sportsint
tab UMA340
 
gen nflsoph1 = UMA342
recode nflsoph1 (1=1) (2/5=0)
tab nflsoph1
tab UMA342

gen nflsoph2 = UMA343
recode nflsoph2 (4=1) (1/3=0) (5=0)
tab nflsoph2
tab UMA343

gen nflsophindex = (nflsoph1 + nflsoph2)/2
tab nflsophindex

alpha nflsoph1 nflsoph2

**Native American Symbolic Racism
gen nativerr1 = UMA344A
recode nativerr1 (1=0) (2=.25) (3=.5) (4=.75) (5=1) (6=.)
tab nativerr1
tab UMA344A

gen nativerr2 = UMA344B
recode nativerr2 (1=1) (2=.75) (3=.5) (4=.25) (5=0) (6=.)
tab nativerr2
tab UMA344A 

gen nativeracialresentment = (nativerr1 + nativerr2)/2
tab nativeracialresentment

**Sports Media Attention
gen sportsmediaatt = UMA346
recode sportsmediaatt (1=1) (2=.66) (3=.33) (4=0)
tab sportsmediaatt

**DC, MD, VA resident
gen DMV = inputstate
recode DMV (1/10=0) (11=1) (12/23=0) (24=1) (25/50=0) (51=1) (53/56=0)
recode DMV (.=0)
tab DMV
tab inputstate


* Support for Name Change (Figure 3)
recode UMA338 6=.
tab UMA338, gen(prot)


lab var prot5 "Strongly oppose"
lab var prot4 "Somewhat oppose"
lab var prot3 "Neither support nor oppose"
lab var prot2 "Somewhat support"
lab var prot1 "Strongly support"

graph bar prot5 prot4 prot3 prot2 prot1 [aw=weight], aspect(1) title("Support for Name Change") asc yvaroptions( relabel(1 "Strongly oppose" 2 "Somewhat oppose" 3 "Neither support nor oppose" 4 "Somewhat support" 5 "Strongly support") label(angle(45)))  ylabel(0 .1 "10%" .2 "20%" .3 "30%" .4 "40%", angle(0) nogrid) xsize(3.5)
graph export namechangesupport.png, replace

*Support for Name Offensive (Figure 3)
recode UMA339 6=.
tab UMA339, gen(protnew)

lab var protnew5 "Strongly agree"
lab var protnew4 "Somewhat agree"
lab var protnew3 "Neither agree nor disagree"
lab var protnew2 "Somewhat disagree"
lab var protnew1 "Strongly disagree"

graph bar protnew5 protnew4 protnew3 protnew2 protnew1 [aw=weight], aspect(1) title("Support for Name Being Offensive") asc yvaroptions( relabel(1 "Strongly disagree" 2 "Somewhat disagree" 3 "Neither agree nor disagree" 4 "Somewhat agree" 5 "Strongly agree") label(angle(45)))  ylabel(0 .1 "10%" .2 "20%" .3 "30%" .4 "40%", angle(0) nogrid) xsize(3.5)
graph export offensivesupport.png, replace


*Regression Model (Table 1)

*Original Model for Name Change
svy: regress namechangepre black latino asian nativeamerican other female  age education partyid ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 
*Updated Model for Name Change with Correct Measure of Partisan Identity and Fandom
svy: regress namechangepre black latino asian nativeamerican other female  age education correctpartyid7 ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 

**Model for Name Change without Weights**
regress namechangepre black latino asian nativeamerican other female  age education partyid ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 
*Updated Model with Correct Measure of Partisan Identity and Fandom 
regress namechangepre black latino asian nativeamerican other female  age education correctpartyid7 ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 


*Original Model for Name Offensive
svy: regress nameoffensivepre black latino asian nativeamerican other female  age education partyid ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 
*Updated Model for Name Offensive with  Correct Measure of Partisan Identity and Fandom
svy: regress nameoffensivepre black latino asian nativeamerican other female  age education correctpartyid7 ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 

*Model Name Offensive without Weights
*Original Model
regress nameoffensivepre black latino asian nativeamerican other female  age education partyid ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 
*Updated Model with  Correct Measure of Partisan Identity and Fandom
regress nameoffensivepre black latino asian nativeamerican other female  age education correctpartyid7 ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 


*Original Model for Team Index
svy: regress skindvpre black latino asian nativeamerican other female  age education partyid ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 
*Updated Model for Team Index with Correct Measure of Partisan Identity and Fandom
svy: regress skindvpre black latino asian nativeamerican other female  age education correctpartyid7 ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 

*Model for Team Index Without Weights
*Original Model for Team Index
regress skindvpre black latino asian nativeamerican other female  age education partyid ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 
*Updated Model for Team Index with Correct Measure of Partisan Identity and Fandom
regress skindvpre black latino asian nativeamerican other female  age education correctpartyid7 ideology DMV nflsophindex sportsint  sportsmediaatt nativeracialresentment washfan PercentNative 

